<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link href="../static/lib/bootstrap/css/bootstrap.css" th:href="@{/lib/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
    <title>欢迎登陆演武创客空间</title>
</head>
<body class="bg-info">
<div class="container">
    <div class="row">
        <!--团队登陆区域-->
        <div class="col-md-4 col-md-offset-4 well">
            <form id="team-login" action="/admin-backend/do-login" th:action="@{/admin-backend/do-login}" method="post">
                <h3 class="h3 text-center">管理员登录</h3>
                <div class="alert alert-danger" th:if="${(param.error != null) and (param.error[0] == 'true')}">
                    用户名或密码错误
                </div>
                <div class="form-group">
                    <label for="username">账号</label>
                    <input type="text" class="form-control" id="username" placeholder="管理员账户" name="username" required>
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" class="form-control" id="password" placeholder="密码"
                           name="password" required>
                </div>
                <!--此处必须设置type为button,不然会触发表单的提交-->
                <button type="submit" class="btn btn-info">登录</button>
                <button type="button" onclick="window.location.href = '/admin-backend/index'" class="btn btn-success">已登录?点这里</button>
            </form>
        </div>
    </div>
    <!--<script type="text/javascript" src="/res/jquery/jquery-3.1.1.js"></script>-->
    <!--<script type="text/javascript" src="/res/bootstrap/js/bootstrap.js"></script>-->
</body>
</html>